﻿#region

using System;
using System.Threading;
using System.Windows.Forms;
using EditeurSyntaxiqueVocal.Class;
using System.IO;
using EditeurSyntaxiqueVocal.Languages.LanguageZ;

#endregion

namespace EditeurSyntaxiqueVocal.Forms
{
    /// <summary>
    /// 
    /// </summary>
    public partial class StartForm : Form
    {
        private  PageStart2 @this;

        /// <summary>
        /// 
        /// </summary>
        public StartForm(PageStart2 @this)
        {
            this.@this = @this;
            InitializeComponent();
            if (!Directory.Exists(VarStatic.RepertoireDataApp))
                Directory.CreateDirectory(VarStatic.RepertoireDataApp);
        }

        protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
        {
            Hide();
            base.OnClosing(e);
            @this.Show();
        }

        private void timerDémarage_Tick(object sender, EventArgs e)
        {
            MainForm _mainForm = new MainForm(this);
            _mainForm.Show();
            _mainForm.Visible = true;
            Visible = false;
            timerDémarage.Stop();
        }       
    }
}